import request from '../util/request';

//添加广告请求
export const addAdvRequest = (myForm) => {
  return request.post("/addAdv", myForm)
}
export const advListRequest = (pageNo, everyNum)=>{
    return request.get(`/advList/${pageNo}/${everyNum}`)
}

export const deleteAdvRequest = (_id) => {
  return request.delete("/deleteAdv", {
    params: {
      _id
    }
  })
}
//更新广告时 获取当前广告信息
export const getUpdateDataRequest = (_id) => {
  return request.get("/getUpdateData", {
    params: {
      _id
    }
  })
}

//更新广告逻辑
export const updateAdvRequest = (formData, _id) => {
  return request.put("/updateAdv", formData, {
    params: {
      _id
    }
  })
}